<include file="Public:header" />
<script charset="utf-8" src="/editor/kindeditor.js"></script>
<script charset="utf-8" src="/editor/lang/zh_CN.js"></script>
<script>
	var editor;
	KindEditor.ready(function(K) {
			editor = K.create('#description',{
					langType : 'en'
				});
	});
		
	function form_check(){
		if($("#product_name_id").val()==""){
			alert("Title can not empty!");
			return false;
		}
		return true;
	}
	
	
	$(document).ready(function(){
		$(function() {
			$( "#start_date" ).datepicker({ dateFormat: 'yy-mm-dd' });
		});
        $(function() {
			$( "#end_date" ).datepicker({ dateFormat: 'yy-mm-dd' });
		});
	});
</script>
<div id="content">
  <form action="#" method="post">
    <table>
      <thead>
        <tr>
          <td colspan="2"><h3>Edit Ads</h3></td>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td colspan="2"></td>
        </tr>
        <tr bgcolor="#FFFFFF">
          <td width="18%"><div align="right">Category&nbsp; </div></td>
          <td width="82%"><select name="cateId" id="cat_id">
              <option value="-1">None</option>
              <volist name="categoty" id="cat_name"  >
                <option value="{$key}" <eq name="data.tb_ads.cateId" value="$key">selected="selected"</eq> >{$cat_name}</option>
              </volist>
            </select>
            * Leave it if the ad is not belong to a product category </td>
        </tr>
        <tr bgcolor="#FFFFFF">
          <td width="18%"><div align="right">Position Code &nbsp; </div></td>
          <td width="82%">
          	<input name="position" value="{$data.tb_ads.position}" size="46" /> * no space allowed (e.g. Index_index_top)
          	<?php /* ?>
            <select name="position">
              <option value="Index_index_top">Home Top Banner</option>
            </select>
            <?php //*/ ?>
          </td>
        </tr>
        <tr bgcolor="#FFFFFF">
          <td width="18%"><div align="right">Name&nbsp; </div></td>
          <td width="82%"><input name="name" value="{$data.tb_ads.name}" type="text" size="95"/>
            &nbsp;</td>
        </tr>
        <tr bgcolor="#FFFFFF">
          <td width="18%"><div align="right">Html Code&nbsp; </div></td>
          <td width="82%"><textarea name="value" style="width:700px;height:200px;">{$data.tb_ads.value}</textarea>
            &nbsp;</td>
        </tr>
        <tr bgcolor="#FFFFFF">
          <td width="18%"><div align="right">Notes Code&nbsp; </div></td>
          <td width="82%"><textarea name="notes" style="width:700px;height:50px;">{$data.tb_ads.notes}</textarea>
            &nbsp;</td>
        </tr>
        <tr bgcolor="#FFFFFF">
          <td width="18%"><div align="right">Start Date: &nbsp; </div></td>
          <td width="82%"><input name="start_date" id="start_date" type="text" size="15" value="{$data.tb_ads.start_date}"/></td>
        </tr>
        <tr bgcolor="#FFFFFF">
          <td width="18%"><div align="right">End Date: &nbsp; </div></td>
          <td width="82%"><input name="end_date" id="end_date" type="text" size="15" value="{$data.tb_ads.end_date}"/></td>
        </tr>
        <tr bgcolor="#FFFFFF">
          <td colspan="2"><div align="center">
              <input type="submit" name="Submit" value="Add">
              <input type="reset" name="chongzhi" value="Reset">
            </div></td>
        </tr>
      </tbody>
    </table>
  </form>
</div>
<include file="Public:footer" />